package com.tengju.payment.domain.model.transfer;

/**
 * 服务费代发枚举类 自认证类型
 *
 * @author 李大仙
 */
public enum CertificationTypeEnum {
    NO_CERTIFICATION(0, "非认证"),
    CERTIFICATION(1, "自认证");

    private Integer code;
    private String desc;

    CertificationTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static CertificationTypeEnum parseByCode(Integer code) {
        for (CertificationTypeEnum statusEnum : (CertificationTypeEnum.values())) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum;
            }
        }
        return null;
    }
}
